import { createApp } from 'vue'
// import './style.css'
import App from './App.vue'
import router from './router/index'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import warningConfirm from './utils/warningConfirm'

import { createPinia } from 'pinia'

const pinia = createPinia()
const app = createApp(App);
app.use(pinia).use(ElementPlus, {locale: zhCn}).use(router).mount('#app')

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}   

app.config.globalProperties.$warningConfirm = warningConfirm;